const Mock = require('mockjs');

// 列表
Mock.mock('/task/applyList', 'get', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "content": [{
      "id": "16739222421508096",
      "createBy": "",
      "createTime": "2018-06-06 18:48:02",
      "updateBy": "",
      "updateTime": "2018-06-06 18:57:55",
      "delFlag": 0,
      "applyTime": "2018-06-06 18:48:02",
      "taskNo": "20180825000001",
      "taskType": 1,
      "applyUser": {
        "id": "16739222421508096",
        "name": "张三"
      },
      "taskStatus": "0",
      'partNumber': '0001',
      'partGraphNumber': 'G00001',
      'partName': '测试零件',
      'batchNumber': '20180825-001',
      'materialNo': 'M00001',
      'projectNo': 'P-001',
      'sampleStatusPhase': 1,
      'acceptTime': "2018-06-06 18:48:02",
      'reportTime': "2018-06-06 18:48:02"
    }],
    "pageable": {
      "offset": 0,
      "pageSize": 10,
      "pageNumber": 0,
    },
    "totalElements": 4,
    "totalPages": 1,
    "size": 10,
  }
});

// 新增
Mock.mock('/task/saveApply', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": "xxxx-999"
});

// 详情
Mock.mock('/task/applyInfoById', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "id": "16739222421508096",
    "applyTime": "2018-06-06 18:48:02",
    "taskType": 1,
    "applyUser": {
      "id": "16739222421508096",
      "name": "张三",
      "org": {
        "name": "委托部门"
      }
    },
    'expectCompleteTime': "2018-06-06 18:48:02",
    "taskStatus": "0",
    'partNumber': '0001',
    'partGraphNumber': 'G00001',
    'partName': '测试零件',
    'batchNumber': '20180825-001',
    'materialNo': 'M00001',
    'projectNo': 'P-001',
    'sampleStatusPhase': 1,
    "totalPartNo": 2,
    "materialFurnanceNumber": "cailiao",
    "heatingNumber": "rechuli",
    "sampleStatus": "实物",
    "quantity": 2,
    "provider": "changshang",
    "remart": "beizhu",
    "taskTarget": "复检",
    "taskFieldList": [{
      "id": "090494iii",
      "fieldName": "mingcheng",
      "fieldId": "jianceid",
      "testPart": "weizhi",
      "requiredment": "xuqiu",
      "seqOrder": 1
    }],
    'acceptTime': "2018-06-06 18:48:02",
    'reportTime': "2018-06-06 18:48:02"
  }

});

// 提交
Mock.mock('/task/submitApply', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
});

// 删除
Mock.mock('/task/deleteApply', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
});

// 操作记录
Mock.mock('/task/operateLog', 'get', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": [{
    "operateTime": "2018-06-06",
    "operateType": "提交任务单",
    'operateRole': "管理员",
    "user": {
        "username": "admin",
        "name": "张三"
    },
    "result": "1",
    "remark": "beizhu"
  }],
  "pageable": {
    "pageSize": 10,
    "pageNumber": 0,
  },
  "totalElements": 10,
  "totalPages": 1,
  "size": 6
});
